<?php
  function uninstall_db(){
   global $wpdb;
    $prefix = "timetable_";
    $query_arr =  array(
      "DROP TABLE IF EXISTS `timetable_client`;",
      "DROP TABLE IF EXISTS `timetable_clientcourse`;",
      "DROP TABLE IF EXISTS `timetable_course`;",
      "DROP TABLE IF EXISTS `timetable_coursestatus`;",
      "DROP TABLE IF EXISTS `timetable_form`;",
      "DROP TABLE IF EXISTS `timetable_paystatus`;",
      "DROP TABLE IF EXISTS `timetable_role`;",
      "DROP TABLE IF EXISTS `timetable_table`;",
      "DROP TABLE IF EXISTS `timetable_teacher`;",
      "DROP TABLE IF EXISTS `timetable_teachercourse`;",
      "DROP TABLE IF EXISTS `timetable_user`;"
    );
    foreach ($query_arr as $query) {
      $wpdb->query($query);
    }
   }
?>
